package model

import "github.com/jinzhu/gorm"

type MonitorApply struct {
	gorm.Model
	ShortName   string `gorm:"size:255;not null"`
	Hostname    string `gorm:"size:255;not null"`
	IP          string `gorm:"size:255;not null"`
	Keyword     string `gorm:"size:255;null"`
	Port        string `gorm:"size:255;null"`
	AppTeam     string `gorm:"size:255;not null"`
	Datacenter  string `gorm:"size:255;not null"`
	ServiceName string `gorm:"size:255;not null"`
	SystemID    int    `gorm:"size:255;not null"`
	TrackNumber string `gorm:"omitempty"`
}

type CmdbAllServer struct {
	gorm.Model
	Env                int8   `gorm:"column:env;type:tinyint(1)"`
	Source             string `gorm:"column:source;type:varchar(40)"`
	ServerType         string `gorm:"column:server_type;type:varchar(10)"`
	Catalog            string `gorm:"column:catalog;type:varchar(100)"`
	SystemName         string `gorm:"column:system_name;type:varchar(200)"`
	ShortName          string `gorm:"column:short_name;type:varchar(200)"`
	ProjectID          int    `gorm:"column:project_id;type:int(11)"`
	Hostname           string `gorm:"column:hostname;not null;type:varchar(100)"`
	IP                 string `gorm:"column:ip;type:varchar(200)"`
	Datacenter         string `gorm:"column:datacenter;type:varchar(50)"`
	ResourcePool       string `gorm:"column:resource_pool;type:varchar(50)"`
	ServerRole         string `gorm:"column:server_role;type:varchar(300)"`
	OsVersion          string `gorm:"column:os_version;type:varchar(300)"`
	Midware            string `gorm:"column:midware;type:text"`
	Status             string `gorm:"column:STATUS;type:varchar(50)"`
	OnlineTime         string `gorm:"column:online_time;type:varchar(100)"`
	RunningStatus      string `gorm:"column:running_status;type:varchar(20)"`
	CreateAt           string `gorm:"column:create_at;type:varchar(30)"`
	NodeExporter       string `gorm:"column:node_exporter;type:varchar(30)"`
	SysProcessExporter string `gorm:"column:sys_process_exporter;type:varchar(30)"`
	ProcessExporter    string `gorm:"column:process_exporter;type:varchar(30)"`
	PortExporter       string `gorm:"column:port_exporter;type:varchar(30)"`
	ZabbixAgent        string `gorm:"column:zabbix_agent;type:varchar(30)"`
	BppmAgent          string `gorm:"column:bppm_agent;type:varchar(30)"`
	ScomAgent          string `gorm:"column:scom_agent;type:varchar(30)"`
	BdopsAgent         string `gorm:"column:bdops_agent;type:varchar(30)"`
}

type MonitorReplaceApply struct {
	gorm.Model
	ShortName      string `gorm:"size:255;not null"`
	Hostname       string `gorm:"size:255;not null"`
	IP             string `gorm:"size:255;not null"`
	Sourcekeywords string `gorm:"size:255;null"`
	Destkeywords   string `gorm:"size:255;not null"`
	AppTeam        string `gorm:"size:255;null"`
	Datacenter     string `gorm:"size:255;not null"`
	ServiceName    string `gorm:"size:255;not null"`
	SystemID       int    `gorm:"size:255;not null"`
	TrackNumber    string `gorm:"omitempty"`
}

type MonitorDeleteApply struct {
	gorm.Model
	ShortName   string `gorm:"size:255;not null"`
	Hostname    string `gorm:"size:255;not null"`
	IP          string `gorm:"size:255;not null"`
	Keyword     string `gorm:"size:255;null"`
	AppTeam     string `gorm:"size:255;null"`
	Datacenter  string `gorm:"size:255;not null"`
	ServiceName string `gorm:"size:255;not null"`
	SystemID    int    `gorm:"size:255;not null"`
	TrackNumber string `gorm:"omitempty"`
}

type KeywordsApply struct {
	gorm.Model
	ShortName   string `gorm:"size:255;not null"`
	Hostname    string `gorm:"size:255;not null"`
	IP          string `gorm:"size:255;not null"`
	Keyword     string `gorm:"size:1023;null"`
	AppTeam     string `gorm:"size:255;not null"`
	Datacenter  string `gorm:"size:255;not null"`
	ServiceName string `gorm:"size:255;not null"`
	SystemID    int    `gorm:"size:255;not null"`
	TrackNumber string `gorm:"omitempty"`
}

type ApplyTrackNumber struct {
	gorm.Model
	TrackNumber      string `gorm:"size:255;not null"`
	ShortName        string `gorm:"size:255;not null"`
	DeployState      string `gorm:"size:255;not null"`
	ServiceState     string `gorm:"size:255;not null"`
	TrackNumberTable string `gorm:"size:255;not null"`
	JobID            string `gorm:"size:255"`
	DeployTime       string `gorm:"size:255"`
}
